package com.example.job_backend.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.job_backend.model.Position;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface PositionMapper extends BaseMapper<Position> {

    @Select("SELECT p.* FROM position p " +
            "JOIN push_position r ON p.id = r.position_id " +
            "WHERE r.student_id = #{studentId} ")
    List<Position> findPosition(@Param("studentId") String studentId);
}
